import Vue from 'vue'
import VueRouter from 'vue-router'

// 商家销售统计-横向柱状图
const SellerPage = () => import('@/views/SellerPage.vue')
// 销量趋势-折线图
const TrendPage = () => import('@/views/TrendPage.vue')
// 商家分布模块-地图+散点图
const MapPage = () => import('@/views/MapPage.vue')
// 销量排行榜-柱状图
const RankPage = () => import('@/views/RankPage.vue')
// 热销商品占比-饼图
const HotPage = () => import('@/views/HotPage.vue')
// 库存与销量-圆环饼图
const StockPage = () => import('@/views/StockPage.vue')

const ScreenPage = () => import('@/views/ScreenPage.vue')

Vue.use(VueRouter)

const router = new VueRouter({
  routes: [
    { path: '/', redirect: 'screen'},
    { path: '/screen', component: ScreenPage },
    { path: '/sellerpage', component: SellerPage },
    { path: '/trendpage', component: TrendPage },
    { path: '/mappage', component: MapPage },
    { path: '/rankpage', component: RankPage },
    { path: '/hotpage', component: HotPage },
    { path: '/stockpage', component: StockPage },
  ]
})

export default router